package cn.ilovese.collect.po.report;

import cn.ilovese.collect.vo.report.ScoreVO;
import lombok.NoArgsConstructor;
import lombok.NonNull;

@NoArgsConstructor
public class Score {
    private Integer id;

    private Integer reportId;

    private Integer userId;

    private Float score;

    private String description;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getReportId() {
        return reportId;
    }

    public void setReportId(Integer reportId) {
        this.reportId = reportId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Float getScore() {
        return score;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public Score(@NonNull ScoreVO scoreVO){
        reportId = scoreVO.getReportId();
        userId = scoreVO.getUserId();
        score = scoreVO.getScore();
        description = scoreVO.getDescription();
    }
}